package com.lz.gmall.product.task;

import com.lz.gmall.product.service.BloomFilterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class ResetBloomFilterTimeTask {

    @Autowired
    private BloomFilterService bloomFilterService;

    @Scheduled(cron = "* * 2 * * ?")
    public void resetBloomFilterTimeTask(){
        log.info("重置bloom过滤器定时任务执行了....");
        bloomFilterService.resetBloomFilter();
    }
}
